/**
 * Created by zhuyufeng on 2015/12/30.
 */
/**
 * Created by zhuyufeng on 2015/9/12.
 */
Ext.define('Ele', {
	extend: 'Ext.data.Model',
	fields: [ 'date', 'fee']
});
var eleStore = Ext.create('Ext.data.Store', {
	model: 'Ele',
	autoLoad: true,
	pageSize: 4,
	proxy: {
		type: 'ajax',
		url : './json/ele',
		reader: {
			type: 'json',
			root: 'rows',
			totalProperty: 'total'
		}
	}
});
var Electricity = Ext.create('Ext.grid.Panel', {
	store: eleStore,
	height:440,
	forceFit:true,
	title: '电费情况',
	columnWidth:.5,
	columns: [
		{
			text: '日期',
			width: 100,
			dataIndex: 'date'
		},
		{
			text: '费用',
			width: 100,
			dataIndex: 'fee'
		}
	],
	dockedItems:[{
		xtype:'pagingtoolbar',
		store:eleStore,
		dock:'bottom',
		displayInfo:true,
		displayMsg:'第{0}条到第{1}条,一共{2}条',
		emptyMsg:'没有记录'
	}]
});
